/* Storage Page - Dracula Theme Consistent with Dashboard */

/* Use the same CSS variables as App.css for consistency */
.storage-page {
  padding: 24px;
  min-height: 100%;
  background-color: var(--darker-bg);
  color: var(--light-text);
  width: 100%;
  box-sizing: border-box;
}

/* Header Section - Consistent with Dashboard */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.header-content h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0 0 8px 0;
}

.header-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--gray-text);
}

.pool-count {
  font-weight: 600;
}

.total-capacity {
  color: var(--gray-text);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Button Styles - Consistent with Dashboard */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  background-color: var(--current-line);
  color: var(--light-text);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--background);
  border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
  background-color: #a278f0;
  border-color: #a278f0;
  box-shadow: 0 4px 12px rgba(189, 147, 249, 0.3);
}

.btn-secondary {
  background-color: var(--current-line);
  color: var(--light-text);
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--background);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-success {
  background-color: var(--success-color);
  color: var(--background);
  border-color: var(--success-color);
}

.btn-success:hover:not(:disabled) {
  background-color: #40d96f;
  box-shadow: 0 2px 8px rgba(80, 250, 123, 0.3);
}

.btn-warning {
  background-color: var(--warning-color);
  color: var(--background);
  border-color: var(--warning-color);
}

.btn-warning:hover:not(:disabled) {
  background-color: #ffc875;
  box-shadow: 0 2px 8px rgba(255, 184, 108, 0.3);
}

.btn-danger {
  background-color: var(--danger-color);
  color: var(--background);
  border-color: var(--danger-color);
}

.btn-danger:hover:not(:disabled) {
  background-color: #ff7875;
  box-shadow: 0 2px 8px rgba(255, 85, 85, 0.3);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  line-height: 16px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  color: #a278f0;
}

/* Search Bar - Consistent with Dashboard */
.search-bar {
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: var(--current-line);
  color: var(--light-text);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--background);
  box-shadow: 0 0 0 3px rgba(189, 147, 249, 0.2);
}

.search-input::placeholder {
  color: var(--gray-text);
}

/* Storage Grid - Consistent with Dashboard */
.storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
}

/* Storage Card - Consistent with Dashboard */
.storage-card {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.storage-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(189, 147, 249, 0.2);
  transform: translateY(-2px);
}

/* Card Header - Consistent with Dashboard */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.pool-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.status-badge.success {
  background-color: rgba(80, 250, 123, 0.1);
  color: var(--success-color);
  border-color: rgba(80, 250, 123, 0.3);
}

.status-badge.secondary {
  background-color: rgba(98, 114, 164, 0.1);
  color: var(--gray-text);
  border-color: rgba(98, 114, 164, 0.3);
}

.status-badge.warning {
  background-color: rgba(255, 184, 108, 0.1);
  color: var(--warning-color);
  border-color: rgba(255, 184, 108, 0.3);
}

.status-badge.danger {
  background-color: rgba(255, 85, 85, 0.1);
  color: var(--danger-color);
  border-color: rgba(255, 85, 85, 0.3);
}

.pool-type {
  font-size: 12px;
  color: var(--gray-text);
  background-color: var(--current-line);
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border-color);
}

.pool-actions {
  display: flex;
  gap: 4px;
}

/* Capacity Section - Consistent with Dashboard */
.capacity-section {
  margin-bottom: 20px;
  padding: 16px;
  background-color: var(--current-line);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.capacity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--light-text);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--current-line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.capacity-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-text);
}

.available-space {
  color: var(--gray-text);
}

.usage-percentage {
  color: var(--light-text);
  font-weight: 600;
}

/* Pool Details - Consistent with Dashboard */
.pool-details {
  margin-bottom: 20px;
  padding: 16px;
  background-color: var(--current-line);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 12px;
  color: var(--gray-text);
  font-weight: 500;
}

.detail-value {
  font-size: 12px;
  color: var(--light-text);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: 500;
}

/* Volumes Section - Consistent with Dashboard */
.volumes-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.volumes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.volumes-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
}

.volumes-list {
  max-height: 200px;
  overflow-y: auto;
}

.volume-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background-color: var(--current-line);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.volume-item:last-child {
  margin-bottom: 0;
}

.volume-item:hover {
  background-color: var(--background);
  border-color: var(--primary-color);
}

.volume-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.volume-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--light-text);
}

.volume-size {
  font-size: 11px;
  color: var(--gray-text);
}

.volume-actions {
  display: flex;
  gap: 4px;
}

/* Empty State - Consistent with Dashboard */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--gray-text);
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.empty-state:hover {
  border-color: var(--primary-color);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 24px;
  opacity: 0.6;
  color: var(--primary-color);
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0 0 12px 0;
}

.empty-state p {
  font-size: 14px;
  margin: 0 0 24px 0;
  color: var(--gray-text);
}

/* Loading State - Consistent with Dashboard */
.loading-container {
  text-align: center;
  padding: 80px 40px;
  color: var(--gray-text);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--current-line);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error State - Consistent with Dashboard */
.error-card {
  text-align: center;
  padding: 60px 40px;
  background-color: rgba(255, 85, 85, 0.1);
  border: 1px solid var(--danger-color);
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.error-icon {
  font-size: 32px;
  margin-bottom: 24px;
  color: var(--danger-color);
}

.error-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--danger-color);
  margin: 0 0 12px 0;
}

.error-card p {
  font-size: 14px;
  color: var(--gray-text);
  margin: 0 0 24px 0;
}

/* Modal Styles - Consistent with Dashboard */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  padding: 20px;
}

.modal-content {
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transition: all 0.2s ease;
}

.modal-content:hover {
  border-color: var(--primary-color);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--current-line);
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--light-text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-text);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--background);
  color: var(--light-text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background-color: var(--current-line);
}

/* Form Styles - Consistent with Dashboard */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--light-text);
  margin-bottom: 8px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background-color: var(--current-line);
  color: var(--light-text);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--background);
  box-shadow: 0 0 0 3px rgba(189, 147, 249, 0.2);
}

/* Scrollbar Styles - Consistent with Dashboard */
.volumes-list::-webkit-scrollbar {
  width: 6px;
}

.volumes-list::-webkit-scrollbar-track {
  background: var(--current-line);
  border-radius: 3px;
}

.volumes-list::-webkit-scrollbar-thumb {
  background: var(--gray-text);
  border-radius: 3px;
}

.volumes-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Responsive Design - Consistent with Dashboard */
@media (max-width: 768px) {
  .storage-page {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .storage-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .pool-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .modal-content {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .storage-page {
    padding: 12px;
  }

  .empty-state {
    padding: 60px 20px;
  }

  .error-card {
    padding: 40px 20px;
  }

  .loading-container {
    padding: 60px 20px;
  }

  .storage-card {
    padding: 16px;
  }

  .capacity-section,
  .pool-details {
    padding: 12px;
  }

  .volume-item {
    padding: 8px 12px;
  }
}